import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import user from '@/components/user'
import userdetail from '@/components/userdetail'
import coupon from '@/components/coupon'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      redirect: '/person',
      children: [
        {
          path: '/person',
          name: 'person',
          component: user,
        },
        {
          path: '/userdetail',
          name: 'userdetail',
          component: userdetail,
        },
        {
          path: '/coupon',
          name: 'coupon',
          component: coupon,
        },
      ]
    }
  ]
})
